<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>shark::CrowdingDistance Struct Reference</title>
<script type="text/javaScript" src="search/search.js"></script>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3.0.1/es5/tex-mml-chtml.js"></script>
<script src="../../mlstyle.js"></script>
<link href="../css/besser.css" rel="stylesheet" type="text/css"/>
</head>
<!-- pretty cool: each body gets an id tag which is the basename of the web page  -->
<!--              and allows for page-specific CSS. this is client-side scripted, -->
<!--              so the id will not yet show up in the served source code -->
<script type="text/javascript">
    jQuery(document).ready(function () {
        var url = jQuery(location).attr('href');
        var pname = url.substr(url.lastIndexOf("/")+1, url.lastIndexOf(".")-url.lastIndexOf("/")-1);
        jQuery('#this_url').html('<strong>' + pname + '</strong>');
        jQuery('body').attr('id', pname);
    });
</script>
<body>
    <div id="shark_old">
        <div id="wrap">
            <div id="header">
                <div id="site-name"><a href="../../sphinx_pages/build/html/index.html">Shark machine learning library</a></div>
                <ul id="nav">
                    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/installation.html">Installation</a>
                    </li>
		    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/tutorials/tutorials.html">Tutorials</a>
                    </li>
		    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/benchmark.html">Benchmarks</a>
                    </li>
                    <li class="active">
                        <a href="classes.html">Documentation</a>
                        <ul>
                            <li class="first"></li>
                            <li><a href="../../sphinx_pages/build/html/rest_sources/quickref/quickref.html">Quick references</a></li>
                            <li><a href="classes.html">Class list</a></li>
                            <li class="last"><a href="group__shark__globals.html">Global functions</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
        </div>
    </div>
<div id="doxywrapper">
<!--
    <div id="global_doxytitle">Doxygen<br>Documentation:</div>
-->
    <div id="navrow_wrapper">
<!-- Generated by Doxygen 1.9.8 -->
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceshark.html">shark</a></li><li class="navelem"><a class="el" href="structshark_1_1_crowding_distance.html">CrowdingDistance</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="structshark_1_1_crowding_distance-members.html">List of all members</a> &#124;
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle"><div class="title">shark::CrowdingDistance Struct Reference</div></div>
</div><!--header-->
<div class="contents">

<p>Implements the Crowding Distance of a pareto front.  
 <a href="structshark_1_1_crowding_distance.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_crowding_distance_8h_source.html">shark/Algorithms/DirectSearch/Operators/Indicators/CrowdingDistance.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ab70a4a4d43580f6912b616d547352e1b" id="r_ab70a4a4d43580f6912b616d547352e1b"><td class="memTemplParams" colspan="2">template&lt;typename ParetofrontType , typename ParetoArchive &gt; </td></tr>
<tr class="memitem:ab70a4a4d43580f6912b616d547352e1b"><td class="memTemplItemLeft" align="right" valign="top">std::size_t&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structshark_1_1_crowding_distance.html#ab70a4a4d43580f6912b616d547352e1b">leastContributor</a> (ParetofrontType const &amp;front, ParetoArchive const &amp;archive) const</td></tr>
<tr class="memdesc:ab70a4a4d43580f6912b616d547352e1b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Selects the point with the smallest crowding distance.  <br /></td></tr>
<tr class="separator:ab70a4a4d43580f6912b616d547352e1b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:accb25d9b19ea166cc6ed1df68121ec63" id="r_accb25d9b19ea166cc6ed1df68121ec63"><td class="memTemplParams" colspan="2">template&lt;typename ParetoFrontType , typename ParetoArchive &gt; </td></tr>
<tr class="memitem:accb25d9b19ea166cc6ed1df68121ec63"><td class="memTemplItemLeft" align="right" valign="top">std::vector&lt; std::size_t &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structshark_1_1_crowding_distance.html#accb25d9b19ea166cc6ed1df68121ec63">leastContributors</a> (ParetoFrontType const &amp;front, ParetoArchive const &amp;archive, std::size_t K) const</td></tr>
<tr class="separator:accb25d9b19ea166cc6ed1df68121ec63"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a76fde6ed24f0c47db44ffc2e145cd2a8" id="r_a76fde6ed24f0c47db44ffc2e145cd2a8"><td class="memTemplParams" colspan="2">template&lt;class random &gt; </td></tr>
<tr class="memitem:a76fde6ed24f0c47db44ffc2e145cd2a8"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structshark_1_1_crowding_distance.html#a76fde6ed24f0c47db44ffc2e145cd2a8">init</a> (std::size_t, std::size_t, random &amp;)</td></tr>
<tr class="separator:a76fde6ed24f0c47db44ffc2e145cd2a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a498f97698c24ee7411df3761c0c33436" id="r_a498f97698c24ee7411df3761c0c33436"><td class="memTemplParams" colspan="2">template&lt;typename Archive &gt; </td></tr>
<tr class="memitem:a498f97698c24ee7411df3761c0c33436"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structshark_1_1_crowding_distance.html#a498f97698c24ee7411df3761c0c33436">serialize</a> (Archive &amp;, const unsigned int)</td></tr>
<tr class="separator:a498f97698c24ee7411df3761c0c33436"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Implements the Crowding Distance of a pareto front. </p>
<p>The Crowding distance is an estimate of the perimeter of the cuboid formed by using the nearest neighbors of a given point as the vertices. The point with the smallest crowding distance is removed from the set.</p>
<p>See the following reference for further details: Deb, Kalyanmoy, et al. "A fast and elitist multiobjective genetic algorithm: NSGA-II." IEEE transactions on evolutionary computation 6.2 (2002): 182-197. </p>

<p class="definition">Definition at line <a class="el" href="_crowding_distance_8h_source.html#l00047">47</a> of file <a class="el" href="_crowding_distance_8h_source.html">CrowdingDistance.h</a>.</p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a76fde6ed24f0c47db44ffc2e145cd2a8" name="a76fde6ed24f0c47db44ffc2e145cd2a8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a76fde6ed24f0c47db44ffc2e145cd2a8">&#9670;&#160;</a></span>init()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class random &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void shark::CrowdingDistance::init </td>
          <td>(</td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">random &amp;&#160;</td>
          <td class="paramname">&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_crowding_distance_8h_source.html#l00111">111</a> of file <a class="el" href="_crowding_distance_8h_source.html">CrowdingDistance.h</a>.</p>

</div>
</div>
<a id="ab70a4a4d43580f6912b616d547352e1b" name="ab70a4a4d43580f6912b616d547352e1b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab70a4a4d43580f6912b616d547352e1b">&#9670;&#160;</a></span>leastContributor()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename ParetofrontType , typename ParetoArchive &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::size_t shark::CrowdingDistance::leastContributor </td>
          <td>(</td>
          <td class="paramtype">ParetofrontType const &amp;&#160;</td>
          <td class="paramname"><em>front</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ParetoArchive const &amp;&#160;</td>
          <td class="paramname"><em>archive</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Selects the point with the smallest crowding distance. </p>
<p>Crowding distance is computed wrt the union of the set front and the archive of points dominating the front </p>

<p class="definition">Definition at line <a class="el" href="_crowding_distance_8h_source.html#l00052">52</a> of file <a class="el" href="_crowding_distance_8h_source.html">CrowdingDistance.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="structshark_1_1_crowding_distance.html#accb25d9b19ea166cc6ed1df68121ec63">leastContributors()</a>.</p>

</div>
</div>
<a id="accb25d9b19ea166cc6ed1df68121ec63" name="accb25d9b19ea166cc6ed1df68121ec63"></a>
<h2 class="memtitle"><span class="permalink"><a href="#accb25d9b19ea166cc6ed1df68121ec63">&#9670;&#160;</a></span>leastContributors()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename ParetoFrontType , typename ParetoArchive &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt; std::size_t &gt; shark::CrowdingDistance::leastContributors </td>
          <td>(</td>
          <td class="paramtype">ParetoFrontType const &amp;&#160;</td>
          <td class="paramname"><em>front</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ParetoArchive const &amp;&#160;</td>
          <td class="paramname"><em>archive</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>K</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_crowding_distance_8h_source.html#l00095">95</a> of file <a class="el" href="_crowding_distance_8h_source.html">CrowdingDistance.h</a>.</p>

<p class="reference">References <a class="el" href="structshark_1_1_crowding_distance.html#ab70a4a4d43580f6912b616d547352e1b">leastContributor()</a>.</p>

</div>
</div>
<a id="a498f97698c24ee7411df3761c0c33436" name="a498f97698c24ee7411df3761c0c33436"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a498f97698c24ee7411df3761c0c33436">&#9670;&#160;</a></span>serialize()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Archive &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void shark::CrowdingDistance::serialize </td>
          <td>(</td>
          <td class="paramtype">Archive &amp;&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const unsigned int&#160;</td>
          <td class="paramname">&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_crowding_distance_8h_source.html#l00114">114</a> of file <a class="el" href="_crowding_distance_8h_source.html">CrowdingDistance.h</a>.</p>

</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li>include/shark/Algorithms/DirectSearch/Operators/Indicators/<a class="el" href="_crowding_distance_8h_source.html">CrowdingDistance.h</a></li>
</ul>
</div><!-- contents -->
</div>
</body>
</html>
